package com.example.mygrade.service;

import com.example.mygrade.domain.Course;
import com.example.mygrade.domain.Major;
import org.springframework.data.domain.Example;
import org.springframework.data.domain.Page;
import org.springframework.data.domain.Pageable;
import org.springframework.stereotype.Service;
import org.springframework.web.multipart.MultipartFile;

import javax.servlet.http.HttpServletResponse;
import java.util.List;

@Service
public interface MajorService {
    List<Major> findAll();

    /**
     * 只做分页的查询
     * @param pageable
     * @return
     */
    Page<Major> findAll(Pageable pageable);

    Page<Major> findAll(Example<Major> student, Pageable pageable);

    Major findById(Integer id);

    Major insert(Major major);

    Major update(Major major);

    void delete(Integer id);

    void delete(Integer[] arr);

    int insertMajor(MultipartFile file) throws Exception;

    void exportMajor(HttpServletResponse response);
}
